package com.szrt.java.day20170104.demo03;

public class CarTest {
	
	public static void main(String[] args) {
		
		
		Car c01=new Car("mbw",200000,"红色");
		Car c02=new Car("mbw",200000,"黑色");
		
		//Car c02=c01;
		
		// == 1：值相等  2：地址也相等
		System.out.println(c01 == c02);      //如果是new 在任何情况下都不相同
		
		System.out.println(c01.equals(c02)); //如果重写了equals方法就有可能相同
		
		
	}

}
